import request from '../utils/request'

// 根据id查找商品信息
export function getById (id) {
  return request.get(`/commodity/${id}`)
}

// 获取商品信息
export function getCommodity (params) {
  return request.get('/commodity', { params: params })
}

// 修改商品信息
export function modCommodity (id, data) {
  return request.put(`/commodity/${id}`, data)
}

// 删除商品
export function deleCommodity (id) {
  return request.delete(`/commodity/${id}`)
}
